-- GENERATED SPELL FOR [Rotting Slime] --


function spell0_3928(pUnit, Event) --@Diseased Slime,n/a--
pUnit:FullCastSpellOnTarget(6907,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3928', 2000, 1)
end

function spell1_3928(pUnit, Event) --@Summon Rusty Chest,n/a--
pUnit:FullCastSpellOnTarget(6464,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3928', 579, 1)
end

function Sorts_3928(pUnit, Event)
local choix_sorts_3928 = math.random(0, 1)
if choix_sorts_3928 == 0 then
pUnit:RegisterEvent('spell0_3928', 1, 1)
end
if choix_sorts_3928 == 1 then
pUnit:RegisterEvent('spell1_3928', 1, 1)
end
end

function mob3928_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3928', math.random(1500, 3000), 1)
end

function mob3928_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3928_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3928_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3928, 1, 'mob3928_Action')
RegisterUnitEvent(3928, 2, 'mob3928_Leave')
RegisterUnitEvent(3928, 3, 'mob3928_Kill')
RegisterUnitEvent(3928, 4, 'mob3928_Die')
